import { App } from 'vue'
import baseRouter,{setupBaseRouter} from '@/utils/baseRouter'
import layout from '@/components/layout/index.vue'
import index from '../views/index/index.vue'
//uniapp
export const routes: any = [
  {
    path: '/',
    name: 'Layout',
    redirect: '/',
    component: layout,
    meta: {
      title: '首页',
      navbar:{}
    },
    children: [
      {
        path: '/',
        name: 'index',
        component: index,
        meta: {
          title: '首页',
          icon: 'home-o'
        }
      },
    ]
  }
]
//uniapp
export function setupRouter (app: App) {
  routes.forEach(item=>{
    baseRouter.addRoute(item);
  })
  setupBaseRouter(app)
}
